-module(beta, [Z]).
-extends(alpha).

-export([new/3, getthis_beta/0, getxyz/0, a/1]).

new(X, Y, Z) ->
    A = ?BASE_MODULE:new(X, Y),
    instance(A, Z).

getthis_beta() ->
    THIS.

getxyz() ->
    %{X, Y, Z}.  % error: X and Y are unbound
    {beta, {alpha, X, Y}, _} = THIS,
    {X, Y, Z}.

a(hello) ->
    tourist.